<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>


<style type="text/css">
.STYLE10 {
	width: 70px;
	height: 22px;
	color: #06F;
	border: 1px solid #dbb119;
	font-size: 18px;
	line-height: normal;
	cursor: pointer;
	font-family: "黑体";
	text-align: center;
}

.STYLE8 {
	text-align: right;
}
</style>
<%
String strRemoteIP = request.getRemoteAddr();
%>
<script type="text/javascript">
	function order_add() {
		if(if_ip){
			$.post(
					"order_order_add.action",
					$("#order_form").serialize(),
					function(data) {
							if (data.status == "0") {
								$("#cn_add").html(data.comNum);
								$("#barcode_add")
										.html(
												"<img src='/yhm_ssh"+data.file+"' width='382' height='106'>");
							} else {
								alert(data.mess);
							}
							if(data.pplb_title == "1"){
								alert("打印机打印失败");
							}
						});
			}else{
				alert('无权限');	
			}
		}
</script>

<div id="order_add"
	style="padding:5px; text-align: center;">
	<div class="ftitle">
		<h1>新订单</h1>
	</div>
	<form id='order_form' method='post'>
		<div class="u_fitem">
				<label>公司编号：</label>
				<input name="companyNum" class="easyui-validatebox" missingMessage="必填" validType="length[3,3]" invalidMessage="必须为3位数字！" required="true">
			</div>
			<div class="fitem">
				<label>种类：</label>
				<input type="radio" name="selABCDE" value="0" checked>0
				<input type="radio" name="selABCDE" value="A">A
				<input type="radio" name="selABCDE" value="B">B
				<input type="radio" name="selABCDE" value="C">C
				<input type="radio" name="selABCDE" value="D">D
				<input type="radio" name="selABCDE" value="E">E
				<!-- <label>（不选默认为0）</label> -->
			</div>
			<div class="u_fitem">
				<label>流水号：</label>
				<input type="text" name="serial_number" class="easyui-validatebox" missingMessage="必填" validType="length[4,4]" invalidMessage="必须为4位数字！" required="true">
			</div>
			<div class="u_fitem">
				<label>重要订单编号：</label>
				<input name="ifImportant" type="text" class="easyui-validatebox" missingMessage="选填" validType="length[4,4]" invalidMessage="必须为4位数字！" required="true">
				<!-- <label>（选填，必须为4位）</label> -->
			</div>
			<div class="u_fitem">
				<label>数量：</label>
				<input type="text" name="num">
			</div>
			<div class="u_fitem">
				<label>客户编号：</label>
				<input type="text" name="customNum">
			</div>
			<div class="u_fitem">
				<label>客户型号：</label>
				<input type="text" name="customType">
			</div>
			<div class="u_fitem">
				<label>唛头：</label>
				<input type="text" name="marks">
			</div>
			<div class="u_fitem">
				<label>机芯：</label>
				<input type="text" name="movement">
			</div>
			<div class="bj_fitem">
				<input type="radio" name="sign" value="0" checked>不标记
				<input type="radio" name="sign" value="1">标记
			</div>
			</form>
			<div style="color: red" align="center"><span id="cn"></span></div>
			<div id="barcode"></div>
		<div class="bj_fitem">
			<input type="button" class="STYLE10" value="提交" onclick="order_add()"/>
			<input name="cleak" type="reset" class="STYLE10" value="重置" />
			&nbsp; 
			&nbsp; 
			&nbsp;
			&nbsp; 
			&nbsp; 
			&nbsp; 
			&nbsp;  
		</div>
	</form>
			&nbsp;
			&nbsp; 
			&nbsp; 
			&nbsp; 
			&nbsp;
	<div style="color: red" align="center">
		<span id="cn_add"></span>
	</div>
	<div id="barcode_add"></div>
</div>
